set more off
clear all
cap log off
set scheme s2mono

set maxvar 30000

cd "" // CHANGE FILE PATH HERE 
global resdir ".\result"
cap noisily shell del $resdir
cap mkdir $resdir
cap mkdir ".\temp"
cap noisily shell del ".\temp"

do ".\dofile\install.do"

log using $resdir\log

*** Medicare Spending Summary ***
do ".\dofile\1_Des.do"

*** Lead item (12') pooled ***
do ".\dofile\2_LeadItem.do"

*** Category (12') pooled ***
do ".\dofile\3_Category.do"

*** CPAP ***
do ".\dofile\4_CPAP.do"
do ".\dofile\5_Hetero.do"
do ".\dofile\6_CPAP_related.do"

do ".\dofile\7_DND.do"

log close
